home *** CD-ROM | disk | FTP | other *** search
/ Quick PC 62 / Quick PC 62.iso / I386 / IIS5_01.CAB / IIS_Looping_JScript.asp < prev    next >
Encoding:
Text File  |  1998-05-29  |  1.4 KB  |  67 lines

  1. <%@ LANGUAGE = JScript %>
  2.  
  3. <!*************************
  4. This sample is provided for educational purposes only. It is not intended to be 
  5. used in a production environment, has not been tested in a production environment, 
  6. and Microsoft will not provide technical support for it. 
  7. *************************>
  8.  
  9.  
  10. <HTML>
  11.     <HEAD>
  12.         <TITLE>Looping</TITLE>
  13.     </HEAD>
  14.  
  15.     <BODY BGCOLOR="White" TOPMARGIN="10" LEFTMARGIN="10">
  16.  
  17.         
  18.         <!-- Display header. -->
  19.         <FONT SIZE="4" FACE="ARIAL, HELVETICA">
  20.         <b>Looping with ASP</B></FONT><BR>
  21.       
  22.         <HR SIZE="1" COLOR="#000000">
  23.  
  24.         <!-- Looping with a For loop. -->
  25.         <% 
  26.            var i ;
  27.            for(i = 1; i < 6; i++) { %> 
  28.  
  29.              <FONT SIZE=<%= i %>> 
  30.              Hello World with a For Loop!<BR>
  31.              </FONT> 
  32.  
  33.         <% } %> 
  34.  
  35.         <HR>
  36.  
  37.         <!-- Looping with a While loop. -->
  38.         <% 
  39.           i = 1 
  40.           while(i < 6) { %>
  41.     
  42.             <FONT SIZE=<%= i %>> 
  43.             Hello World with a While Loop!<BR>
  44.             </FONT> 
  45.  
  46.             <% i = i+1; %>
  47.  
  48.         <% } %> 
  49.  
  50.         <HR>
  51.  
  52.         <!-- Looping with a Do...While loop. -->
  53.         <% 
  54.           i = 1 
  55.           do { %>
  56.     
  57.             <FONT SIZE=<%= i %>> 
  58.             Hello World with a Do...While Loop!<BR>
  59.             </FONT> 
  60.  
  61.             <% i = i+1; %>
  62.  
  63.         <% } while(i < 6); %> 
  64.  
  65.     </BODY>
  66. </HTML>
  67.